<template>
  <div class="box">
    <div class="bg"></div>
    <van-nav-bar id="van-bar" :title="title" :border="border" left-arrow @click-left="onClickLeft">
      <template #left>
        <img :style="{ width: widthPx, height: heightPx }" src="@/assets/iconPerfectInformation/nav_back@2x.png" />
      </template>
    </van-nav-bar>

    <div class="glance" :style="'top:' +
      (topheight) +
      'px;height:calc(100vh - ' +
      (topheight) +
      'px);width:100%;overflow:auto;'
      ">
      <img src="@/assets/myicon/img-certified.png" style="width: 100%;
height: 449px;" alt="" sizes="" srcset="">
      <div class="name" v-if="data">{{ data.name }}</div>
      <div class="card" v-if="data">{{ data.card_id }}</div>
      <div class="time" v-if="data">认证时间：{{ data.date }}</div>
    </div>
  </div>
</template>

<script>
import { Getrenzhen } from '@/api/setting'

export default {
  data() {
    return {
      border: "",
      widthPx: "28px",
      heightPx: "28px",
      topheight: 0,
      isActive: 0,
      isshow: true,
      title: "实名认证",
      isActive: 0,
      data: ''
    };
  },
  mounted() {
    this.topheight = document.getElementById("van-bar").offsetHeight;
    this.data = this.$route.query.data;
    console.log(this.$store.state.baidu_token);
    Getrenzhen(this.$store.state.baidu_token).then((res) => {
        console.log(res);
      })
  },

  methods: {
    onClickLeft() {
      this.$router.push({ path: '/my' })
      // this.$router.back();
    },
    qiehuan(e) {
      this.isActive = e
    }
  },
};
</script>

<style scoped>
.bg {
  width: 375px;
  height: 88px;
  position: absolute;
  top: 0;
  background: linear-gradient(180deg, #CDE1FD 0%, rgba(255, 255, 255, 0) 100%);
}

.glancelist {
  width: 345px;
  margin: 0 auto;
}

.name {
  position: absolute;
  top: 318px;
  text-align: center;
  width: 100%;
  font-size: 14px;
  font-family: PingFangSC, PingFang SC;
  font-weight: 500;
  color: #FFFFFF;
}

.card {
  position: absolute;
  top: 347px;
  text-align: center;
  width: 100%;
  font-size: 14px;
  font-family: PingFangSC, PingFang SC;
  font-weight: 500;
  color: #FFFFFF;
}

.time {
  position: absolute;
  top: 384px;
  text-align: center;
  width: 100%;
  font-size: 12px;
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  line-height: 12px;
}

.van-cell {
  background-color: transparent;
}

.van-cell::after {
  border-color: #d8d8d8;
}

.van-cell__value {
  color: #1a1a1a;
  font-weight: 500;
}

.btn {
  float: right;
  margin: 6px 0;
  text-align: center;
  width: 84px;
  height: 28px;
  border-radius: 8px;
  line-height: 28px;
  border: 1px solid #767676;
  font-size: 12px;
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  color: #767676;
}
</style>
